package com.tien.model;


import java.util.Date;
import java.util.Set;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


/**
 * @author xt40919
 * @version Create Time：Aug 16, 2011 10:19:13 AM
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Article implements java.io.Serializable {


/**
* 
*/
private static final long serialVersionUID = -3650790538637682858L;
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;


@Persistent
private Long employeeId;


@Persistent
private String classify;


@Persistent
    private Content content;
@Persistent
    private Set<Comment> comments;
@Persistent
private Integer commentsCount = 0;


@Persistent
private String title;
@Persistent
private Integer clickNum;
@Persistent
private Date publisherDate;


public Article() {
}


public Article(Long id, Long employeeId, String classify, String title,
Integer clickNum, Date publisherDate) {
this.id = id;
this.employeeId = employeeId;
this.classify = classify;
this.title = title;
this.clickNum = clickNum;
this.publisherDate = publisherDate;
}


public Article(Long employeeId, String classify, String title,
Integer clickNum, Date publisherDate) {
this.employeeId = employeeId;
this.classify = classify;
this.title = title;
this.clickNum = clickNum;
this.publisherDate = publisherDate;
}


public Long getId() {
return id;
}


public void setId(Long id) {
this.id = id;
}


public Long getEmployeeId() {
return employeeId;
}


public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
}


public String getClassify() {
return classify;
}


public void setClassify(String classify) {
this.classify = classify;
}


public String getTitle() {
return title;
}


public void setTitle(String title) {
this.title = title;
}


public Integer getClickNum() {
return clickNum;
}


public void setClickNum(Integer clickNum) {
this.clickNum = clickNum;
}


public Date getPublisherDate() {
return publisherDate;
}


public void setPublisherDate(Date publisherDate) {
this.publisherDate = publisherDate;
}


@Override
public String toString() {
return "id = " + id + " employeeId = " + employeeId + " classify = "
+ classify + "title = " + title 
+ " clickNum = " + clickNum + " publisherDate=" + publisherDate;


}


public Content getContent() {
return content;
}


public void setContent(Content content) {
this.content = content;
}


public Set<Comment> getComments() {
return comments;
}


public void setComments(Set<Comment> comments) {
this.comments = comments;
}


public Integer getCommentsCount() {
return commentsCount;
}


public void setCommentsCount(Integer commentsCount) {
this.commentsCount = commentsCount;
}




}
